/* 改变主题色变量 */
$--color-primary: #3963bc;

$--color-primary: #3963bc;
$--color-success: #00c292 !default;
$--color-warning: #dee2e6 !default;
$--color-danger: #f4516c !default;

/* 改变 icon 字体路径变量，必需 */
$--font-path: "~element-ui/lib/theme-chalk/fonts";

@import "~element-ui/packages/theme-chalk/src/index";

@import "./lin-variables.scss";

// button
.el-button {
  padding: 8px 16px;
  border-radius: 2px;
  &.is-round {
    padding:8px 16px;
  }
  &.el-button--mini {
    padding: 5px 12px;
  }
  &.el-button--medium {
    padding: 7px 12px;
  }
  &.el-button--small {
    padding: 6px 12px;
  }
}
.el-button--primary.is-plain,
.el-button--success.is-plain,
.el-button--info.is-plain,
.el-button--danger.is-plain,
.el-button--warning.is-plain {
  background: #fff;
}
.el-button--primary {
  &.is-plain {
    color: #3963bc;
    background: #fff;
    border: 1px solid #3963bc;
  }
  &:hover,
  &:focus {
    background: #0037ad;
    border: 1px solid #0037ad;
  }
}
.el-button--success {
  &.is-plain {
    color: #34bfa3;
    background: #fff;
    border: 1px solid #34bfa3;
  }
  &:hover,
  &:focus {
    background: #009d72;
    border: 1px solid #009d72;
  }
}
.el-button--danger {
  &.is-plain {
    color: #f4516c;
    background: #fff;
    border: 1px solid #f4516c;
  }
  &:hover,
  &:focus {
    background: #d62f40;
    border: 1px solid #d62f40;
  }
}
.el-button--warning {
  color: #8c98ae;
  &.is-plain {
    color: #8c98ae;
    background: #fff;
    border: 1px solid #8c98ae;
    &:hover,
    &:focus {
      background: #8c98ae;
      color: #fff;
      border: 1px solid #8c98ae;
    }
    &.is-disabled {
      color: #8c98ae;
      background: #fff;
      border: 1px solid #8c98ae;
      opacity: 0.5;
      &:hover,
      &:focus {
        color: #8c98ae;
        background: #fff;
        border: 1px solid #8c98ae;
        opacity: 0.5;
      }
    }
  }

  &:hover,
  &:focus {
    color: #8c98ae;
    background: #bfcbd7;
    border: 1px solid #bfcbd7;
  }
  &.is-disabled {
    background: #dee2e6;
    color: #8c98ae;
    border: 1px solid #dee2e6;
    opacity: 0.5;
    &:hover,
    &:focus {
      background: #dee2e6;
      color: #8c98ae;
      border: 1px solid #dee2e6;
      opacity: 0.5;
    }
  }
}

// checkbox
.module-box .module .el-checkbox__label {
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.module-box .is-checked .el-checkbox__label {
  color: $theme;
}

.el-checkbox {
  color: #666666;
}

.permissions-li .is-checked .el-checkbox__label {
  color: $theme;
}

.el-checkbox__inner {
  border: 1px solid #c4c0d2;
}

.el-checkbox__input.is-checked .el-checkbox__inner {
  background: $theme;
  border: 1px solid $theme;
}

// radio
.el-radio__label {
  color: #333333;
}

.el-radio-group {
  padding-top: 15px;
  width: 100%;
}

.el-radio__inner {
  border: 1px solid #c4c0d2 !important;
}

.el-radio__input.is-checked .el-radio__inner {
  background: $theme;
  border: none !important;
}

.el-radio__input.is-checked + .el-radio__label {
  color: $theme;
}

// form
.el-form-item__label {
  color: #333333;
  font-weight: 500;
  padding: 0 20px 0 0;
  font-size: 14px;
}

.el-form-item__content {
  margin-bottom: 20px;
}

.el-form--label-top .el-form-item__label {
  padding-bottom: 0px !important;
  color: $title-color;
  font-weight: 500;
}

.el-form-item {
  margin-bottom: 15px !important;
}

// pagination
.el-pagination__editor.el-input .el-input__inner {
  border-radius: 4px;
}

.el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $parent-title-color;
  color: #fff;
}

// input
.el-input-group__append {
  padding: 0 8px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  background: $theme;
  color: #ffffff;
  border: 1px solid $theme;
}

.el-input-group--append .el-input__inner {
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  border-right: none;
  width: 150px;
  transition: all 0.2s linear;

  &:focus {
    width: 250px;
    transition: all 0.3s linear;
  }
}

.el-input-group__append,
.el-input-group__prepend {
  padding: 0 8px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  background: $theme;
  color: #ffffff;
  border: 1px solid $theme;

  .el-icon-search {
    font-size: 18px;
  }
}

.el-input .el-input__inner {
  border: 1px solid #c4c0d2 !important;
}

.input-with-select > input.el-input__inner {
  border-right: none !important;
}

// table
.el-table {
  border-top: 1px solid $table-border-color;
  border-left: 1px solid $table-border-color;
  border-right: 1px solid $table-border-color;
}

.el-table:not(.el-table--border) {
  td {
    border: none;
  }
}
.el-table--border {
  border-right: none !important;
  table {
    border-top: none !important;
  }
}

.el-table .cell {
  display: flex;
  margin-top: 2px;
  margin-bottom: 2px;
  padding-left: 20px;
}

.el-table thead tr th .cell {
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.el-table__body {
  tbody {
    color: #555;
    font-weight: 400;
  }
}

thead tr {
  height: 62px;
}
.el-table__body tr {
  height: 52px;
}
.el-table th,
.el-table td {
  padding: 9px 0px;
}
.el-table--striped .el-table__body tr {
  background: #f8f9fa;
}
.el-table--striped .el-table__body tr.el-table__row--striped td {
  background: #fff;
}
.el-table__body tr.current-row > td,
.el-table__body tr.hover-row.current-row > td,
.el-table__body tr.hover-row.el-table__row--striped.current-row > td,
.el-table__body tr.hover-row.el-table__row--striped > td,
.el-table__body tr.hover-row > td {
  background-color: #ecf5ff;
}

.el-table__expand-icon {
  color:#3963bc;
  font-size: 18px;
  top:-5px;
}

// dialog
.el-dialog__footer {
  text-align: left;
  padding-left: 30px;
}

.el-dialog__title {
  color: $parent-title-color;
  font-size: 16px;
  font-weight: 500;
}

.el-dialog__header {
  padding-left: 30px;
}

.el-dialog__body {
  padding: 30px;
}

// tab
.el-tabs__item.is-active {
  color: $theme;
}

.el-tabs__item {
  color: #333;
}

// menu
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: $sidebar-width;
  text-align: left;

  .circle {
    .el-menu-item {
      position: relative;

      &:before {
        content: "";
        width: 4px;
        height: 4px;
        border-radius: 50%;
        border: 1px solid $submenu-title;
        position: absolute;
        left: 45px;
        top: 23px;
      }
    }

    .el-menu-item-group__title {
      padding: 0;
    }

    .el-menu-item.is-active {
      position: relative;

      &:before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        border: none;
        background: $theme;
        position: absolute;
        left: 45px;
        top: 23px;
      }
    }
    &.third {
      // 3级
      .el-menu-item {
        position: relative;

        &:before {
          content: "";
          width: 4px;
          height: 4px;
          border-radius: 50%;
          border: 1px solid $submenu-title;
          position: absolute;
          left: 65px;
          top: 23px;
        }
      }

      .el-menu-item-group__title {
        padding: 0;
      }

      .el-menu-item.is-active {
        position: relative;

        &:before {
          content: "";
          width: 6px;
          height: 6px;
          border-radius: 50%;
          border: none;
          background: $theme;
          position: absolute;
          left: 65px;
          top: 23px;
        }
      }
    }
  }
}

.el-menu-vertical-demo {
  padding-top: 20px;
  border-right: 1px solid #1d2a60;
}

.el-menu--vertical .abc {
  left: 70px !important;
}

.el-menu--vertical /deep/ .icon-erjizhibiao {
  display: none;
}
.el-menu--vertical /deep/ .two-folder {
  margin-left: 40px;
}

.is-active {
  color: $theme !important;
  &.el-menu-item
    .iconfont{
      color: $theme !important;
    }
}

.el-submenu__icon-arrow {
  top: 53%;
}

.el-input__inner{
  height: 32px;
  line-height: 32px;
}

.app-sidebar .el-menu-item-group .el-menu-item {
  padding-left: 60px !important;
}

.el-submenu.is-active {
  .el-submenu__title {
    color: $theme !important;
    height: 50px;

    i {
      color: $theme;
    }
  }
}

.el-submenu.is-active.is-opened {
  .el-submenu__title {
    color: $submenu-title !important;
    background: $menuItem-bg !important;
    height: 50px;

    &:hover {
      background: $menuItem-hover !important;
    }

    i {
      color: $submenu-title;
    }
  }
}

.is-opened {
  .el-submenu__title {
    height: $menuItem-height;
    transition: border-color 0s, background-color 0s, color 0s;
  }

  .el-menu--inline {
    background: $menuItem-bg !important;
    &:hover {
      background-color: $menuItem-hover !important;
    }
  }

  .el-submenu__title {
    background: $menuItem-bg !important;
    &:hover {
      background-color: $menuItem-hover !important;
    }
  }

  .el-menu-item {
    background: $menuItem-bg !important;

    &:hover {
      background-color: $menuItem-hover !important;
    }
  }
}

.el-menu-item {
  //display: flex;
  //align-items: center;
  height: $menuItem-height;
  transition: border-color 0s, background-color 0s, color 0s;

  &:hover {
    background-color: $menuItem-hover;
  }
}

.el-menu--popup-right-start {
  margin-top: 5px;
  padding-bottom: 0px;

  .el-menu-item-group {
    background: red;
    margin-top: -10px;

    .el-menu-item-group__title {
      padding-top: 0px;
      padding-bottom: 0px;
    }
  }
}

.el-submenu__title {
  // display: flex;
  height: $menuItem-height;
  align-items: center;
  line-height: 50px;
  // padding-left: 17px !important;
  box-sizing: border-box;

  i {
    color: $submenu-title;
  }
}

.el-menu--collapse {
  // margin-left: -2px;
  .el-submenu.is-active {
    .el-submenu__title {
      height: $menuItem-height;
      background-color: #1d2a60 !important;

      i {
        color: $theme;
      }
    }
  }
}

.el-submenu__title * {
  vertical-align: inherit;
}

.el-menu-item * {
  vertical-align: top;
}

.router-link-active {
  .el-menu-item.is-active {
    height: $menuItem-height;
    color: $theme !important;
  }
}

// .el-tooltip {
//   padding-left: 16px !important;
//   line-height: 48px;
//   height: 50px;
// }

// .el-tooltip__popper.is-dark {
//   background: #1d2a60 !important;
// }

// layout
.el-container.is-vertical {
  background: $appmain-background;
}

.el-aside {
  transition: all 0.3s linear;
}

.el-main {
  padding: 0 20px 20px 20px;
  background: $appmain-background;
}

.el-container {
  height: 100%;
}
